package com.ItemsRent.action;

import java.util.HashMap;
import java.util.List;

import com.ItemsRent.IService.IRule;
import com.ItemsRent.model.CheckRule;

public class RuleAction {

    private Integer ruleId;
    private String content;
    
    private IRule ruleService;
	private HashMap<String, Object> result = new HashMap<String, Object>();;
    
	public Integer getRuleId() {
		return ruleId;
	}

	public void setRuleId(Integer ruleId) {
		this.ruleId = ruleId;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public IRule getRuleService() {
		return ruleService;
	}

	public void setRuleService(IRule ruleService) {
		this.ruleService = ruleService;
	}
	
	
	public HashMap<String, Object> getResult() {
		return result;
	}

	public void setResult(HashMap<String, Object> result) {
		this.result = result;}
	
	public String findAll(){
		List<CheckRule> list=ruleService.findAllRule();
		/*
		for(CheckRule rule : list){
			System.out.println(rule.getContent());
		}
		*/
		result.put("rule",list);
		return "success";
	}
}
